home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / BBS_UTL / DDPLUS71 / IBBS.ZIP / IBBSDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1995-03-23  |  1KB  |  46 lines

  1. program ibbsdemo;
  2. {$M $C000,0,100000}
  3.  
  4. uses
  5.  ibbs;
  6.  
  7. function upstr(s1: string): string;
  8. var
  9.  s2 : string;
  10.  i1: integer;
  11. begin
  12.  s2:='';
  13.  for i1:=1 to length(s1) do s2:=s2+upcase(s1[i1]);
  14.  upstr:=s2;
  15. end;
  16.  
  17. begin
  18.  if (paramcount<1) or ((upstr(paramstr(1))<>'IN') and (upstr(paramstr(1))<>'OUT') and (upstr(paramstr(1))<>'HUB')) then
  19.   begin
  20.    writeln(#13#10,'InterBBS Demo Program');
  21.    if paramcount<1 then
  22.    writeln(^G^G'■  ERROR:   Not enough Parameters!') else writeln(^G^G'■  ERROR:   Invalid Parameters!');
  23.    writeln('■  Usage:   IBBSDEMO IN    (Process incoming *.MSG files)');
  24.    writeln('■  Usage:   IBBSDEMO OUT   (Process outgoing *.MSG files, send to');
  25.    writeln('                            "To Address" in IBBS.CFG)');
  26.    writeln('■  Usage:   IBBSDEMO HUB   (Process outgoing *.MSG files, send to all');
  27.    writeln('                            "To Addresses" in ROUTE.CFG)');
  28.    writeln;
  29.    halt(1);
  30.   end;
  31.  if upstr(paramstr(1)) = 'IN' then
  32.   begin
  33.    get_ibbs_incoming;
  34.    halt(0);
  35.   end;
  36.  if upstr(paramstr(1)) = 'OUT' then
  37.   begin
  38.    make_ibbs_outgoing(convert_address(to_system_address),true);
  39.    halt(0);
  40.   end;
  41.  if upstr(paramstr(1)) = 'HUB' then
  42.   begin
  43.    make_multi_ibbs_outgoing;
  44.    halt(0);
  45.   end;
  46. end.